|
|
|
CAUTION
|
|
|
|
|
You should not edit or delete members of the control that you previously defined with code alone because the ActiveX Control Interface Wizard works by analyzing comments it places in the code. The wizard may or may not be able to interpret your hand-typed code correctly. |
|
|
|
|
|
|
|
|
|
|
The next step in the ActiveX Control Interface Wizard is to assign the public members of the custom control to members of the constituent controls. This process is called mapping the members. For example, rather than create your own Text property, you can simply map the Text property of your custom control to the Text property of txtCharSet. The Set Mapping dialog box, shown in Figure 14.12, contains a list of all the properties, methods, and events that you identified as being part of the public interface of the custom control. |
|
|
|
|
|
|
|
|
Figure 14.12
Mapping the public members of the control links
them to members in the constituent controls. |
|
|
|
|
|
|
|
|
The Set Mapping dialog box contains two combo boxes to identify the control and the control's member to which a public member should be mapped. To map a single public member of the custom control, follow these steps: |
|
|
|
|
|
|
|
|
1. Select the member in the Public Name list. For this example, highlight the Text property on the left. |
|
|
|
|
|
|
|
|
2. Select txtCharSet from the Control drop-down list. (This list contains the names of all the standard controls in your custom control.) |
|
|
|
|
|
|
|
|
3. Select the member of that control from the Member drop-down list. In this case, the Text property is selected automatically for you. This process is illustrated in Figure 14.12 for the Text property of the TxtCharLimit control. |
|
|
|
|
|
|
|
|
|
In the Set Mapping dialog box, notice that you can map more than one public member at a time. The list of public names supports multiple selections. You can select multiple members from the list and then select a component to which to map the members. Each public |
|
|
|
|
|
|
|